package com.itheima.ydd.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itheima.ydd.dto.PageDto;
import com.itheima.ydd.dto.YddArticleDto;
import com.itheima.ydd.entity.Result;
import com.itheima.ydd.entity.YddArticle;
import com.itheima.ydd.entity.YddUser;
import com.itheima.ydd.entity.YddUserData;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author shiqiang
 * @version 1.0
 * @date 2022/4/10 21:22
 */
public interface UserService {
    //分页查询我的文章
    PageDto<YddArticle> getMyArticle(String limit, String page,HttpServletRequest request);
    //分页查询我的点赞/收藏文章,同时带有分类名称
    ResponseEntity<Result> getUserDataList(String type, String limit, String page, HttpServletRequest request);
    //删除我的文章
    void delArticleById(String id,HttpServletRequest request);
    //修改我的文章
    void editArticle(YddArticle article,HttpServletRequest request);
    //点赞,取消点赞,收藏,取消收藏
    void userDataHandle(String type,String article_id, String action,HttpServletRequest request);
    //修改用户资料
    void update(YddUser yddUser,HttpServletRequest request);
    //发布成功
    void addArticle(YddArticle article,HttpServletRequest request);

    YddUser getUserInfo(HttpServletRequest request);
}
